300 |
How do I change the cell's background color
Dim h as N Dim oGrid as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("C1") oGrid.Columns.Add("C2") var_Items = oGrid.Items h = var_Items.AddItem("Cell 1") ' var_Items.CellValue(h,1) = "Cell 2" oGrid.TemplateDef = "dim var_Items,h" oGrid.TemplateDef = var_Items oGrid.TemplateDef = h oGrid.Template = "var_Items.CellValue(h,1) = `Cell 2`" ' var_Items.CellBackColor(h,1) = 255 oGrid.TemplateDef = "dim var_Items,h" oGrid.TemplateDef = var_Items oGrid.TemplateDef = h oGrid.Template = "var_Items.CellBackColor(h,1) = 255" |
299 |
How do I change the caption or value for a particular cell
Dim oGrid as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("C1") oGrid.Columns.Add("C2") var_Items = oGrid.Items ' var_Items.CellValue(var_Items.AddItem("Cell 1"),1) = "Cell 2" oGrid.TemplateDef = "dim var_Items" oGrid.TemplateDef = var_Items oGrid.Template = "var_Items.CellValue(AddItem(`Cell 1`),1) = `Cell 2`" |
298 |
How do I get the handle of the cell
Dim h as N Dim oGrid as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("Default") var_Items = oGrid.Items h = var_Items.AddItem("Root 1") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") ' var_Items.ExpandItem(h) = .t. oGrid.TemplateDef = "dim var_Items,h" oGrid.TemplateDef = var_Items oGrid.TemplateDef = h oGrid.Template = "var_Items.ExpandItem(h) = True" ' var_Items.CellBold(,var_Items.ItemCell(h,0)) = .t. oGrid.TemplateDef = "dim var_Items" oGrid.TemplateDef = var_Items oGrid.Template = "var_Items.CellBold(,ItemCell(h,0)) = True" |
297 |
How do I retrieve the focused item
Dim h as N Dim oGrid as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("Default") var_Items = oGrid.Items h = var_Items.AddItem("Root 1") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") ' var_Items.ExpandItem(h) = .t. oGrid.TemplateDef = "dim var_Items,h" oGrid.TemplateDef = var_Items oGrid.TemplateDef = h oGrid.Template = "var_Items.ExpandItem(h) = True" ' var_Items.ItemBold(var_Items.FocusItem) = .t. oGrid.TemplateDef = "dim var_Items" oGrid.TemplateDef = var_Items oGrid.Template = "var_Items.ItemBold(FocusItem) = True" |
296 |
How do I get the number or count of child items
Dim h as N Dim oGrid as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("Default") var_Items = oGrid.Items h = var_Items.AddItem("Root 1") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") ' var_Items.ExpandItem(h) = .t. oGrid.TemplateDef = "dim var_Items,h" oGrid.TemplateDef = var_Items oGrid.TemplateDef = h oGrid.Template = "var_Items.ExpandItem(h) = True" var_Items.AddItem(var_Items.ChildCount(h)) |
295 |
How do I enumerate the visible items
Dim h as N Dim oGrid as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("Default") var_Items = oGrid.Items h = var_Items.AddItem("Root 1") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") ' var_Items.ExpandItem(h) = .t. oGrid.TemplateDef = "dim var_Items,h" oGrid.TemplateDef = var_Items oGrid.TemplateDef = h oGrid.Template = "var_Items.ExpandItem(h) = True" h = var_Items.AddItem("Root 2") ' var_Items.ItemBold(var_Items.FirstVisibleItem) = .t. oGrid.TemplateDef = "dim var_Items" oGrid.TemplateDef = var_Items oGrid.Template = "var_Items.ItemBold(FirstVisibleItem) = True" ' var_Items.ItemBold(var_Items.NextVisibleItem(var_Items.FirstVisibleItem)) = .t. oGrid.TemplateDef = "dim var_Items" oGrid.TemplateDef = var_Items oGrid.Template = "var_Items.ItemBold(NextVisibleItem(FirstVisibleItem)) = True" |
294 |
How do I enumerate the siblings items
Dim h as N Dim oGrid as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("Default") var_Items = oGrid.Items h = var_Items.AddItem("Root 1") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") ' var_Items.ExpandItem(h) = .t. oGrid.TemplateDef = "dim var_Items,h" oGrid.TemplateDef = var_Items oGrid.TemplateDef = h oGrid.Template = "var_Items.ExpandItem(h) = True" h = var_Items.AddItem("Root 2") ' var_Items.ItemBold(var_Items.NextSiblingItem(var_Items.FirstVisibleItem)) = .t. oGrid.TemplateDef = "dim var_Items" oGrid.TemplateDef = var_Items oGrid.Template = "var_Items.ItemBold(NextSiblingItem(FirstVisibleItem)) = True" ' var_Items.ItemBold(var_Items.PrevSiblingItem(var_Items.NextSiblingItem(var_Items.FirstVisibleItem))) = .t. oGrid.TemplateDef = "dim var_Items" oGrid.TemplateDef = var_Items oGrid.Template = "var_Items.ItemBold(PrevSiblingItem(NextSiblingItem(FirstVisibleItem))) = True" |
293 |
How do I get the parent item
Dim h as N Dim oGrid as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("Default") var_Items = oGrid.Items h = var_Items.AddItem("Root 1") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") ' var_Items.ExpandItem(h) = .t. oGrid.TemplateDef = "dim var_Items,h" oGrid.TemplateDef = var_Items oGrid.TemplateDef = h oGrid.Template = "var_Items.ExpandItem(h) = True" ' var_Items.ItemBold(var_Items.ItemParent(var_Items.ItemChild(h))) = .t. oGrid.TemplateDef = "dim var_Items" oGrid.TemplateDef = var_Items oGrid.Template = "var_Items.ItemBold(ItemParent(ItemChild(h))) = True" |
292 |
How do I get the first child item
Dim h as N Dim oGrid as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("Default") var_Items = oGrid.Items h = var_Items.AddItem("Root 1") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") ' var_Items.ExpandItem(h) = .t. oGrid.TemplateDef = "dim var_Items,h" oGrid.TemplateDef = var_Items oGrid.TemplateDef = h oGrid.Template = "var_Items.ExpandItem(h) = True" ' var_Items.ItemBold(var_Items.ItemChild(h)) = .t. oGrid.TemplateDef = "dim var_Items" oGrid.TemplateDef = var_Items oGrid.Template = "var_Items.ItemBold(ItemChild(h)) = True" |
291 |
How do I enumerate the root items
Dim h as N Dim oGrid as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("Default") var_Items = oGrid.Items h = var_Items.AddItem("Root 1") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") ' var_Items.ExpandItem(h) = .t. oGrid.TemplateDef = "dim var_Items,h" oGrid.TemplateDef = var_Items oGrid.TemplateDef = h oGrid.Template = "var_Items.ExpandItem(h) = True" h = var_Items.AddItem("Root 2") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") ' var_Items.ItemBold(var_Items.RootItem(0)) = .t. oGrid.TemplateDef = "dim var_Items" oGrid.TemplateDef = var_Items oGrid.Template = "var_Items.ItemBold(RootItem(0)) = True" ' var_Items.ItemUnderline(var_Items.RootItem(1)) = .t. oGrid.TemplateDef = "dim var_Items" oGrid.TemplateDef = var_Items oGrid.Template = "var_Items.ItemUnderline(RootItem(1)) = True" |
290 |
I have a hierarchy, how can I count the number of root items
Dim h as N Dim oGrid as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("Default") var_Items = oGrid.Items h = var_Items.AddItem("Root 1") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") ' var_Items.ExpandItem(h) = .t. oGrid.TemplateDef = "dim var_Items,h" oGrid.TemplateDef = var_Items oGrid.TemplateDef = h oGrid.Template = "var_Items.ExpandItem(h) = True" h = var_Items.AddItem("Root 2") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") var_Items.AddItem(var_Items.RootCount) |
289 |
How can I make an item unselectable, or not selectable
Dim h as N Dim oGrid as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("Column") var_Items = oGrid.Items h = var_Items.AddItem("unselectable - you can't get selected") ' var_Items.SelectableItem(h) = .f. oGrid.TemplateDef = "dim var_Items,h" oGrid.TemplateDef = var_Items oGrid.TemplateDef = h oGrid.Template = "var_Items.SelectableItem(h) = False" var_Items.AddItem("selectable") |
288 |
How can I hide or show an item
Dim h as N Dim oGrid as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("Column") var_Items = oGrid.Items h = var_Items.AddItem("hidden") ' var_Items.ItemHeight(h) = 0 oGrid.TemplateDef = "dim var_Items,h" oGrid.TemplateDef = var_Items oGrid.TemplateDef = h oGrid.Template = "var_Items.ItemHeight(h) = 0" ' var_Items.SelectableItem(h) = .f. oGrid.TemplateDef = "dim var_Items,h" oGrid.TemplateDef = var_Items oGrid.TemplateDef = h oGrid.Template = "var_Items.SelectableItem(h) = False" var_Items.AddItem("visible") |
287 |
How can I change the height for all items
Dim oGrid as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.DefaultItemHeight = 32 oGrid.Columns.Add("Column") oGrid.Items.AddItem("One") oGrid.Items.AddItem("Two") |
286 |
How do I change the height of an item
Dim oGrid as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.ScrollBySingleLine = .t. oGrid.Columns.Add("Default") var_Items = oGrid.Items ' var_Items.ItemHeight(var_Items.AddItem("height")) = 128 oGrid.TemplateDef = "dim var_Items" oGrid.TemplateDef = var_Items oGrid.Template = "var_Items.ItemHeight(AddItem(`height`)) = 128" oGrid.Items.AddItem("enabled") |
285 |
How do I disable or enable an item
Dim oGrid as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("Default") var_Items = oGrid.Items ' var_Items.EnableItem(var_Items.AddItem("disabled")) = .f. oGrid.TemplateDef = "dim var_Items" oGrid.TemplateDef = var_Items oGrid.Template = "var_Items.EnableItem(AddItem(`disabled`)) = False" oGrid.Items.AddItem("enabled") |
284 |
How do I display as strikeout a cell
Dim oGrid as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("Default") var_Items = oGrid.Items ' var_Items.CellStrikeOut(var_Items.AddItem("strikeout"),0) = .t. oGrid.TemplateDef = "dim var_Items" oGrid.TemplateDef = var_Items oGrid.Template = "var_Items.CellStrikeOut(AddItem(`strikeout`),0) = True" |
283 |
How do I display as strikeout a cell or an item
Dim oGrid as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("Default") var_Items = oGrid.Items ' var_Items.CellValueFormat(var_Items.AddItem("gets <s>strikeout</s> only a portion of text"),0) = 1 oGrid.TemplateDef = "dim var_Items" oGrid.TemplateDef = var_Items oGrid.Template = "var_Items.CellValueFormat(AddItem(`gets <s>strikeout</s> only a portion of text`),0) = 1" |
282 |
How do I display as strikeout an item
Dim oGrid as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("Default") var_Items = oGrid.Items ' var_Items.ItemStrikeOut(var_Items.AddItem("strikeout")) = .t. oGrid.TemplateDef = "dim var_Items" oGrid.TemplateDef = var_Items oGrid.Template = "var_Items.ItemStrikeOut(AddItem(`strikeout`)) = True" |
281 |
How do I underline a cell
Dim oGrid as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("Default") var_Items = oGrid.Items ' var_Items.CellUnderline(var_Items.AddItem("underline"),0) = .t. oGrid.TemplateDef = "dim var_Items" oGrid.TemplateDef = var_Items oGrid.Template = "var_Items.CellUnderline(AddItem(`underline`),0) = True" |
280 |
How do I underline a cell or an item
Dim oGrid as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("Default") var_Items = oGrid.Items ' var_Items.CellValueFormat(var_Items.AddItem("gets <u>underline</u> only a portion of text"),0) = 1 oGrid.TemplateDef = "dim var_Items" oGrid.TemplateDef = var_Items oGrid.Template = "var_Items.CellValueFormat(AddItem(`gets <u>underline</u> only a portion of text`),0) = 1" |
279 |
How do I underline an item
Dim oGrid as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("Default") var_Items = oGrid.Items ' var_Items.ItemUnderline(var_Items.AddItem("underline")) = .t. oGrid.TemplateDef = "dim var_Items" oGrid.TemplateDef = var_Items oGrid.Template = "var_Items.ItemUnderline(AddItem(`underline`)) = True" |
278 |
How do I display as italic a cell
Dim oGrid as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("Default") var_Items = oGrid.Items ' var_Items.CellItalic(var_Items.AddItem("italic"),0) = .t. oGrid.TemplateDef = "dim var_Items" oGrid.TemplateDef = var_Items oGrid.Template = "var_Items.CellItalic(AddItem(`italic`),0) = True" |
277 |
How do I display as italic a cell or an item
Dim oGrid as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("Default") var_Items = oGrid.Items ' var_Items.CellValueFormat(var_Items.AddItem("gets <i>italic</i> only a portion of text"),0) = 1 oGrid.TemplateDef = "dim var_Items" oGrid.TemplateDef = var_Items oGrid.Template = "var_Items.CellValueFormat(AddItem(`gets <i>italic</i> only a portion of text`),0) = 1" |
276 |
How do I display as italic an item
Dim oGrid as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("Default") var_Items = oGrid.Items ' var_Items.ItemItalic(var_Items.AddItem("italic")) = .t. oGrid.TemplateDef = "dim var_Items" oGrid.TemplateDef = var_Items oGrid.Template = "var_Items.ItemItalic(AddItem(`italic`)) = True" |
275 |
How do I bold a cell
Dim oGrid as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("Default") var_Items = oGrid.Items ' var_Items.CellBold(var_Items.AddItem("bold"),0) = .t. oGrid.TemplateDef = "dim var_Items" oGrid.TemplateDef = var_Items oGrid.Template = "var_Items.CellBold(AddItem(`bold`),0) = True" |
274 |
How do I bold a cell or an item
Dim oGrid as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("Default") var_Items = oGrid.Items ' var_Items.CellValueFormat(var_Items.AddItem("gets <b>bold</b> only a portion of text"),0) = 1 oGrid.TemplateDef = "dim var_Items" oGrid.TemplateDef = var_Items oGrid.Template = "var_Items.CellValueFormat(AddItem(`gets <b>bold</b> only a portion of text`),0) = 1" |
273 |
How do I bold an item
Dim oGrid as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("Default") var_Items = oGrid.Items ' var_Items.ItemBold(var_Items.AddItem("bold")) = .t. oGrid.TemplateDef = "dim var_Items" oGrid.TemplateDef = var_Items oGrid.Template = "var_Items.ItemBold(AddItem(`bold`)) = True" |
272 |
How do I change the foreground color for the item
Dim h as N Dim hC as N Dim oGrid as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("Default") var_Items = oGrid.Items h = var_Items.AddItem("Root") hC = var_Items.InsertItem(h,,"Child 1") ' var_Items.ItemForeColor(hC) = 255 oGrid.TemplateDef = "dim var_Items,hC" oGrid.TemplateDef = var_Items oGrid.TemplateDef = hC oGrid.Template = "var_Items.ItemForeColor(hC) = 255" var_Items.InsertItem(h,,"Child 2") ' var_Items.ExpandItem(h) = .t. oGrid.TemplateDef = "dim var_Items,h" oGrid.TemplateDef = var_Items oGrid.TemplateDef = h oGrid.Template = "var_Items.ExpandItem(h) = True" |
271 |
How do I change the visual appearance for the item, using your EBN technology
Dim h as N Dim hC as N Dim oGrid as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.VisualAppearance.Add(1,"c:\exontrol\images\normal.ebn") oGrid.Columns.Add("Default") var_Items = oGrid.Items h = var_Items.AddItem("Root") hC = var_Items.InsertItem(h,,"Child 1") ' var_Items.ItemBackColor(hC) = 16777216 oGrid.TemplateDef = "dim var_Items,hC" oGrid.TemplateDef = var_Items oGrid.TemplateDef = hC oGrid.Template = "var_Items.ItemBackColor(hC) = 16777216" var_Items.InsertItem(h,,"Child 2") ' var_Items.ExpandItem(h) = .t. oGrid.TemplateDef = "dim var_Items,h" oGrid.TemplateDef = var_Items oGrid.TemplateDef = h oGrid.Template = "var_Items.ExpandItem(h) = True" |
270 |
How do I change the background color for the item
Dim h as N Dim hC as N Dim oGrid as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("Default") var_Items = oGrid.Items h = var_Items.AddItem("Root") hC = var_Items.InsertItem(h,,"Child 1") ' var_Items.ItemBackColor(hC) = 255 oGrid.TemplateDef = "dim var_Items,hC" oGrid.TemplateDef = var_Items oGrid.TemplateDef = hC oGrid.Template = "var_Items.ItemBackColor(hC) = 255" var_Items.InsertItem(h,,"Child 2") ' var_Items.ExpandItem(h) = .t. oGrid.TemplateDef = "dim var_Items,h" oGrid.TemplateDef = var_Items oGrid.TemplateDef = h oGrid.Template = "var_Items.ExpandItem(h) = True" |
269 |
How do I expand or collapse an item
Dim h as N Dim oGrid as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("Default") var_Items = oGrid.Items h = var_Items.AddItem("Root") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") ' var_Items.ExpandItem(h) = .t. oGrid.TemplateDef = "dim var_Items,h" oGrid.TemplateDef = var_Items oGrid.TemplateDef = h oGrid.Template = "var_Items.ExpandItem(h) = True" |
268 |
How do I associate an extra data to an item
Dim oGrid as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("Default") var_Items = oGrid.Items ' var_Items.ItemData(var_Items.AddItem("item")) = "your extra data" oGrid.TemplateDef = "dim var_Items" oGrid.TemplateDef = var_Items oGrid.Template = "var_Items.ItemData(AddItem(`item`)) = `your extra data`" |
267 |
How do I get the number or count of items
Dim h as N Dim oGrid as P Dim var_Items as P Dim var_Items1 as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("Default") var_Items = oGrid.Items h = var_Items.AddItem("Root") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") ' var_Items.ExpandItem(h) = .t. oGrid.TemplateDef = "dim var_Items,h" oGrid.TemplateDef = var_Items oGrid.TemplateDef = h oGrid.Template = "var_Items.ExpandItem(h) = True" var_Items1 = oGrid.Items var_Items1.AddItem(var_Items1.ItemCount) |
266 |
How can I specify the width of the ActiveX control, when using the InsertControlItem property
Dim h as N Dim oGrid as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.ScrollBySingleLine = .f. oGrid.TreeColumnIndex = 1 oGrid.DrawGridLines = -1 oGrid.Columns.Add("C1") oGrid.Columns.Add("C2") oGrid.Columns.Add("C3") var_Items = oGrid.Items h = var_Items.InsertControlItem(,"MSCAL.Calendar") ' var_Items.ItemWidth(h) = 128 oGrid.TemplateDef = "dim var_Items,h" oGrid.TemplateDef = var_Items oGrid.TemplateDef = h oGrid.Template = "var_Items.ItemWidth(h) = 128" ' var_Items.CellValue(h,0) = "This is a bit of text that is shown in the first column" oGrid.TemplateDef = "dim var_Items,h" oGrid.TemplateDef = var_Items oGrid.TemplateDef = h oGrid.Template = "var_Items.CellValue(h,0) = `This is a bit of text that is shown in the first column`" ' var_Items.CellSingleLine(h,0) = .f. oGrid.TemplateDef = "dim var_Items,h" oGrid.TemplateDef = var_Items oGrid.TemplateDef = h oGrid.Template = "var_Items.CellSingleLine(h,0) = False" ' var_Items.CellValue(h,2) = "This is a bit of text that is shown in the third column" oGrid.TemplateDef = "dim var_Items,h" oGrid.TemplateDef = var_Items oGrid.TemplateDef = h oGrid.Template = "var_Items.CellValue(h,2) = `This is a bit of text that is shown in the third column`" ' var_Items.CellSingleLine(h,2) = .f. oGrid.TemplateDef = "dim var_Items,h" oGrid.TemplateDef = var_Items oGrid.TemplateDef = h oGrid.Template = "var_Items.CellSingleLine(h,2) = False" |
265 |
How can I put the ActiveX control in a different column, when using the InsertControlItem property
Dim h as N Dim oGrid as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.ScrollBySingleLine = .f. oGrid.DrawGridLines = -1 oGrid.Columns.Add("C1") oGrid.Columns.Add("C2") oGrid.Columns.Add("C3") var_Items = oGrid.Items h = var_Items.InsertControlItem(,"MSCAL.Calendar") ' var_Items.CellValue(h,0) = "This is a bit of text that is shown in the first column" oGrid.TemplateDef = "dim var_Items,h" oGrid.TemplateDef = var_Items oGrid.TemplateDef = h oGrid.Template = "var_Items.CellValue(h,0) = `This is a bit of text that is shown in the first column`" ' var_Items.CellSingleLine(h,0) = .f. oGrid.TemplateDef = "dim var_Items,h" oGrid.TemplateDef = var_Items oGrid.TemplateDef = h oGrid.Template = "var_Items.CellSingleLine(h,0) = False" ' var_Items.ItemWidth(h) = -32001 oGrid.TemplateDef = "dim var_Items,h" oGrid.TemplateDef = var_Items oGrid.TemplateDef = h oGrid.Template = "var_Items.ItemWidth(h) = -32001" ' var_Items.CellValue(h,2) = "This is a bit of text that is shown in the third column" oGrid.TemplateDef = "dim var_Items,h" oGrid.TemplateDef = var_Items oGrid.TemplateDef = h oGrid.Template = "var_Items.CellValue(h,2) = `This is a bit of text that is shown in the third column`" ' var_Items.CellSingleLine(h,2) = .f. oGrid.TemplateDef = "dim var_Items,h" oGrid.TemplateDef = var_Items oGrid.TemplateDef = h oGrid.Template = "var_Items.CellSingleLine(h,2) = False" |
264 |
Is there any function I can use to get the program or the control identifier I've been using when called the InsertControlItem
Dim h as N Dim oGrid as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("Default") oGrid.ScrollBySingleLine = .f. oGrid.LinesAtRoot = -1 var_Items = oGrid.Items h = var_Items.InsertControlItem(,"MSCAL.Calendar") var_Items.InsertItem(h,,var_Items.ItemControlID(h)) ' var_Items.ExpandItem(h) = .t. oGrid.TemplateDef = "dim var_Items,h" oGrid.TemplateDef = var_Items oGrid.TemplateDef = h oGrid.Template = "var_Items.ExpandItem(h) = True" h = var_Items.InsertControlItem(,"MSChart20Lib.MSChart") ' var_Items.ItemAppearance(h) = 4 oGrid.TemplateDef = "dim var_Items,h" oGrid.TemplateDef = var_Items oGrid.TemplateDef = h oGrid.Template = "var_Items.ItemAppearance(h) = 4" var_Items.InsertItem(h,,var_Items.ItemControlID(h)) ' var_Items.ExpandItem(h) = .t. oGrid.TemplateDef = "dim var_Items,h" oGrid.TemplateDef = var_Items oGrid.TemplateDef = h oGrid.Template = "var_Items.ExpandItem(h) = True" |
263 |
How can I change the height of newly created ActiveX control, using the InsertControlItem
Dim oGrid as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("Default") oGrid.ScrollBySingleLine = .f. var_Items = oGrid.Items ' var_Items.ItemHeight(var_Items.InsertControlItem(,"MSCAL.Calendar")) = 64 oGrid.TemplateDef = "dim var_Items" oGrid.TemplateDef = var_Items oGrid.Template = "var_Items.ItemHeight(InsertControlItem(,`MSCAL.Calendar`)) = 64" ' var_Items.ItemAppearance(var_Items.InsertControlItem(,"MSChart20Lib.MSChart")) = 4 oGrid.TemplateDef = "dim var_Items" oGrid.TemplateDef = var_Items oGrid.Template = "var_Items.ItemAppearance(InsertControlItem(,`MSChart20Lib.MSChart`)) = 4" |
262 |
How can I change the border for newly created ActiveX control, using the InsertControlItem
Dim oGrid as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("Default") oGrid.ScrollBySingleLine = .f. var_Items = oGrid.Items ' var_Items.ItemAppearance(var_Items.InsertControlItem(,"MSCAL.Calendar")) = 2 oGrid.TemplateDef = "dim var_Items" oGrid.TemplateDef = var_Items oGrid.Template = "var_Items.ItemAppearance(InsertControlItem(,`MSCAL.Calendar`)) = 2" ' var_Items.ItemAppearance(var_Items.InsertControlItem(,"MSChart20Lib.MSChart")) = 4 oGrid.TemplateDef = "dim var_Items" oGrid.TemplateDef = var_Items oGrid.Template = "var_Items.ItemAppearance(InsertControlItem(,`MSChart20Lib.MSChart`)) = 4" |
261 |
How can I access the properties and methods for an ActiveX control that I've just added using the InsertControlItem
Dim h as N Dim oGrid as P Dim var_Calendar as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("Default") var_Items = oGrid.Items h = var_Items.AddItem("Root") var_Calendar = var_Items.ItemObject(var_Items.InsertControlItem(h,"MSCAL.Calendar")) var_Calendar.BackColor = 16777215 var_Calendar.GridCellEffect = 0 var_Calendar.ShowTitle = .f. var_Calendar.ShowDateSelectors = .f. ' var_Items.ExpandItem(h) = .t. oGrid.TemplateDef = "dim var_Items,h" oGrid.TemplateDef = var_Items oGrid.TemplateDef = h oGrid.Template = "var_Items.ExpandItem(h) = True" |
260 |
How can I access the properties and methods for an ActiveX control that I've just added using the InsertControlItem
Dim h as N Dim oGrid as P Dim var_Calendar as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("Default") var_Items = oGrid.Items h = var_Items.AddItem("Root") var_Calendar = var_Items.ItemObject(var_Items.InsertControlItem(h,"MSCAL.Calendar")) var_Calendar.BackColor = 16777215 ' var_Items.ExpandItem(h) = .t. oGrid.TemplateDef = "dim var_Items,h" oGrid.TemplateDef = var_Items oGrid.TemplateDef = h oGrid.Template = "var_Items.ExpandItem(h) = True" |
259 |
How can I insert an ActiveX control
Dim h as N Dim oGrid as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("Default") var_Items = oGrid.Items h = var_Items.AddItem("Root") var_Items.InsertControlItem(h,"MSCAL.Calendar") ' var_Items.ExpandItem(h) = .t. oGrid.TemplateDef = "dim var_Items,h" oGrid.TemplateDef = var_Items oGrid.TemplateDef = h oGrid.Template = "var_Items.ExpandItem(h) = True" |
258 |
How can I change at runtime the parent of the item
Dim hC as N Dim hP as N Dim oGrid as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.LinesAtRoot = -1 oGrid.Columns.Add("Default") var_Items = oGrid.Items hP = var_Items.AddItem("Root") hC = var_Items.AddItem("Child") var_Items.SetParent(hC,hP) |
257 |
How can I sort the items
Dim h as N Dim oGrid as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("Default") var_Items = oGrid.Items h = var_Items.AddItem("Root") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") ' var_Items.ExpandItem(h) = .t. oGrid.TemplateDef = "dim var_Items,h" oGrid.TemplateDef = var_Items oGrid.TemplateDef = h oGrid.Template = "var_Items.ExpandItem(h) = True" oGrid.Columns.Item("Default").SortOrder = 2 |
256 |
How do I sort the child items
Dim h as N Dim oGrid as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("Default") var_Items = oGrid.Items h = var_Items.AddItem("Root") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") ' var_Items.ExpandItem(h) = .t. oGrid.TemplateDef = "dim var_Items,h" oGrid.TemplateDef = var_Items oGrid.TemplateDef = h oGrid.Template = "var_Items.ExpandItem(h) = True" var_Items.SortChildren(h,0,.f.) |
255 |
How can I ensure or scroll the control so the item fits the control's client area
Dim h as N Dim oGrid as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("Default") h = oGrid.Items.AddItem("item") oGrid.Items.EnsureVisibleItem(h) |
254 |
How can I remove or delete all items
Dim oGrid as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("Default") oGrid.Items.AddItem("removed item") oGrid.Items.RemoveAllItems() |
253 |
How can I remove or delete an item
Dim h as N Dim oGrid as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("Default") h = oGrid.Items.AddItem("removed item") oGrid.Items.RemoveItem(h) |
252 |
How can I add or insert child items
Dim h as N Dim oGrid as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.LinesAtRoot = -1 oGrid.Columns.Add("C1") oGrid.Columns.Add("C2") var_Items = oGrid.Items h = var_Items.AddItem("Cell 1") ' var_Items.CellValue(h,1) = "Cell 2" oGrid.TemplateDef = "dim var_Items,h" oGrid.TemplateDef = var_Items oGrid.TemplateDef = h oGrid.Template = "var_Items.CellValue(h,1) = `Cell 2`" ' var_Items.CellValue(var_Items.InsertItem(h,,"Cell 3"),1) = "Cell 4" oGrid.TemplateDef = "dim var_Items" oGrid.TemplateDef = var_Items oGrid.Template = "var_Items.CellValue(InsertItem(h,,`Cell 3`),1) = `Cell 4`" ' var_Items.CellValue(var_Items.InsertItem(h,,"Cell 5"),1) = "Cell 6" oGrid.TemplateDef = "dim var_Items" oGrid.TemplateDef = var_Items oGrid.Template = "var_Items.CellValue(InsertItem(h,,`Cell 5`),1) = `Cell 6`" ' var_Items.ExpandItem(h) = .t. oGrid.TemplateDef = "dim var_Items,h" oGrid.TemplateDef = var_Items oGrid.TemplateDef = h oGrid.Template = "var_Items.ExpandItem(h) = True" |
251 |
How can I add or insert a child item
Dim oGrid as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.LinesAtRoot = -1 oGrid.Columns.Add("Default") var_Items = oGrid.Items var_Items.InsertItem(var_Items.AddItem("root"),,"child") |
250 |
How can I add or insert an item
Dim h as N Dim oGrid as P Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("C1") oGrid.Columns.Add("C2") var_Items = oGrid.Items ' var_Items.CellValue(var_Items.AddItem("Cell 1"),1) = "Cell 2" oGrid.TemplateDef = "dim var_Items" oGrid.TemplateDef = var_Items oGrid.Template = "var_Items.CellValue(AddItem(`Cell 1`),1) = `Cell 2`" h = var_Items.AddItem("Cell 3") ' var_Items.CellValue(h,1) = "Cell 4" oGrid.TemplateDef = "dim var_Items,h" oGrid.TemplateDef = var_Items oGrid.TemplateDef = h oGrid.Template = "var_Items.CellValue(h,1) = `Cell 4`" |
249 |
How can I add or insert an item
Dim oGrid as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("Default") oGrid.Items.AddItem("new item") |
248 |
How can I get the columns as they are shown in the control's sortbar
Dim oGrid as P Dim var_Object as P oGrid = topparent:CONTROL_ACTIVEX1.activex var_Object = oGrid.Columns.ItemBySortPosition(0) |
247 |
How can I access the properties of a column
Dim oGrid as P Dim var_Column as local oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("A") ' oGrid.Columns.Item("A").HeaderBold = .t. var_Column = oGrid.Columns.Item("A") oGrid.TemplateDef = "dim var_Column" oGrid.TemplateDef = var_Column oGrid.Template = "var_Column.HeaderBold = True" |
246 |
How can I remove all the columns
Dim oGrid as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Clear() |
245 |
How can I remove a column
Dim oGrid as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Remove("A") |
244 |
How can I get the number or the count of columns
Dim oGrid as P Dim var_Count as oGrid = topparent:CONTROL_ACTIVEX1.activex var_Count = oGrid.Columns.Count |
243 |
How can I change the font for all cells in the entire column
Dim f as P Dim oGrid as P Dim var_ConditionalFormat as P oGrid = topparent:CONTROL_ACTIVEX1.activex f = OLE.Create("StdFont") f.Name = "Tahoma" f.Size = 12 var_ConditionalFormat = oGrid.ConditionalFormats.Add("1") var_ConditionalFormat.Font = f var_ConditionalFormat.ApplyTo = 0 oGrid.Columns.Add("Column") oGrid.Items.AddItem(0) oGrid.Items.AddItem(1) |
242 |
How can I change the background color for all cells in the column
Dim oGrid as P Dim var_ConditionalFormat as P oGrid = topparent:CONTROL_ACTIVEX1.activex var_ConditionalFormat = oGrid.ConditionalFormats.Add("1") var_ConditionalFormat.BackColor = 255 var_ConditionalFormat.ApplyTo = 0 oGrid.Columns.Add("Column") oGrid.Items.AddItem(0) oGrid.Items.AddItem(1) |
241 |
How can I change the foreground color for all cells in the column
Dim oGrid as P Dim var_ConditionalFormat as P oGrid = topparent:CONTROL_ACTIVEX1.activex var_ConditionalFormat = oGrid.ConditionalFormats.Add("1") var_ConditionalFormat.ForeColor = 255 var_ConditionalFormat.ApplyTo = 0 oGrid.Columns.Add("Column") oGrid.Items.AddItem(0) oGrid.Items.AddItem(1) |
240 |
How can I show as strikeout all cells in the column
Dim oGrid as P Dim var_ConditionalFormat as P oGrid = topparent:CONTROL_ACTIVEX1.activex var_ConditionalFormat = oGrid.ConditionalFormats.Add("1") var_ConditionalFormat.StrikeOut = .t. var_ConditionalFormat.ApplyTo = 0 oGrid.Columns.Add("Column") oGrid.Items.AddItem(0) oGrid.Items.AddItem(1) |
239 |
How can I underline all cells in the column
Dim oGrid as P Dim var_ConditionalFormat as P oGrid = topparent:CONTROL_ACTIVEX1.activex var_ConditionalFormat = oGrid.ConditionalFormats.Add("1") var_ConditionalFormat.Underline = .t. var_ConditionalFormat.ApplyTo = 0 oGrid.Columns.Add("Column") oGrid.Items.AddItem(0) oGrid.Items.AddItem(1) |
238 |
How can I show in italic all data in the column
Dim oGrid as P Dim var_ConditionalFormat as P oGrid = topparent:CONTROL_ACTIVEX1.activex var_ConditionalFormat = oGrid.ConditionalFormats.Add("1") var_ConditionalFormat.Italic = .t. var_ConditionalFormat.ApplyTo = 0 oGrid.Columns.Add("Column") oGrid.Items.AddItem(0) oGrid.Items.AddItem(1) |
237 |
How can I bold the entire column
Dim oGrid as P Dim var_ConditionalFormat as P oGrid = topparent:CONTROL_ACTIVEX1.activex var_ConditionalFormat = oGrid.ConditionalFormats.Add("1") var_ConditionalFormat.Bold = .t. var_ConditionalFormat.ApplyTo = 0 oGrid.Columns.Add("Column") oGrid.Items.AddItem(0) oGrid.Items.AddItem(1) |
236 |
How can I display a computed column and highlight some values that are negative or less than a value
Dim oGrid as P Dim var_Column as local Dim var_ConditionalFormat as P Dim var_Items as P Dim var_Items1 as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("A") oGrid.Columns.Add("B") ' oGrid.Columns.Add("(A+B)*1.19").ComputedField = "(dbl(%0) + dbl(%1)) * 1.19" var_Column = oGrid.Columns.Add("(A+B)*1.19") oGrid.TemplateDef = "dim var_Column" oGrid.TemplateDef = var_Column oGrid.Template = "var_Column.ComputedField = `(dbl(%0) + dbl(%1)) * 1.19`" var_Items = oGrid.Items ' var_Items.CellValue(var_Items.AddItem(1),1) = 2 oGrid.TemplateDef = "dim var_Items" oGrid.TemplateDef = var_Items oGrid.Template = "var_Items.CellValue(AddItem(1),1) = 2" var_Items1 = oGrid.Items ' var_Items1.CellValue(var_Items1.AddItem(10),1) = 20 oGrid.TemplateDef = "dim var_Items1" oGrid.TemplateDef = var_Items1 oGrid.Template = "var_Items1.CellValue(AddItem(10),1) = 20" var_ConditionalFormat = oGrid.ConditionalFormats.Add("dbl(%2) > 10") var_ConditionalFormat.Bold = .t. var_ConditionalFormat.ForeColor = 255 var_ConditionalFormat.ApplyTo = 2 '2 + |
235 |
Can I display a computed column so it displays the VAT, or SUM
Dim oGrid as P Dim var_Column as local Dim var_Items as P Dim var_Items1 as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("A") oGrid.Columns.Add("B") ' oGrid.Columns.Add("(A+B)*1.19").ComputedField = "(dbl(%0) + dbl(%1)) * 1.19" var_Column = oGrid.Columns.Add("(A+B)*1.19") oGrid.TemplateDef = "dim var_Column" oGrid.TemplateDef = var_Column oGrid.Template = "var_Column.ComputedField = `(dbl(%0) + dbl(%1)) * 1.19`" var_Items = oGrid.Items ' var_Items.CellValue(var_Items.AddItem(1),1) = 2 oGrid.TemplateDef = "dim var_Items" oGrid.TemplateDef = var_Items oGrid.Template = "var_Items.CellValue(AddItem(1),1) = 2" var_Items1 = oGrid.Items ' var_Items1.CellValue(var_Items1.AddItem(10),1) = 20 oGrid.TemplateDef = "dim var_Items1" oGrid.TemplateDef = var_Items1 oGrid.Template = "var_Items1.CellValue(AddItem(10),1) = 20" |
234 |
How can I show a column that adds values in the cells
Dim oGrid as P Dim var_Column as local Dim var_Items as P Dim var_Items1 as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("A") oGrid.Columns.Add("B") ' oGrid.Columns.Add("A+B").ComputedField = "dbl(%0) + dbl(%1)" var_Column = oGrid.Columns.Add("A+B") oGrid.TemplateDef = "dim var_Column" oGrid.TemplateDef = var_Column oGrid.Template = "var_Column.ComputedField = `dbl(%0) + dbl(%1)`" var_Items = oGrid.Items ' var_Items.CellValue(var_Items.AddItem(1),1) = 2 oGrid.TemplateDef = "dim var_Items" oGrid.TemplateDef = var_Items oGrid.Template = "var_Items.CellValue(AddItem(1),1) = 2" var_Items1 = oGrid.Items ' var_Items1.CellValue(var_Items1.AddItem(10),1) = 20 oGrid.TemplateDef = "dim var_Items1" oGrid.TemplateDef = var_Items1 oGrid.Template = "var_Items1.CellValue(AddItem(10),1) = 20" |
233 |
Is there any function to filter the control's data as I type, so the items being displayed include the typed characters
Dim oGrid as P Dim var_Column as P oGrid = topparent:CONTROL_ACTIVEX1.activex var_Column = oGrid.Columns.Add("Filter") var_Column.FilterOnType = .t. var_Column.DisplayFilterButton = .t. var_Column.AutoSearch = 1 oGrid.Items.AddItem("Canada") oGrid.Items.AddItem("USA") |
232 |
Is there any function to filter the control's data as I type, something like filter on type
Dim oGrid as P Dim var_Column as P oGrid = topparent:CONTROL_ACTIVEX1.activex var_Column = oGrid.Columns.Add("Filter") var_Column.FilterOnType = .t. var_Column.DisplayFilterButton = .t. oGrid.Items.AddItem("Canada") oGrid.Items.AddItem("USA") |
231 |
How can I programmatically filter a column
Dim oGrid as P Dim var_Column as P oGrid = topparent:CONTROL_ACTIVEX1.activex var_Column = oGrid.Columns.Add("Filter") var_Column.DisplayFilterButton = .t. var_Column.FilterType = 2 oGrid.Items.AddItem() oGrid.Items.AddItem("not empty") oGrid.ApplyFilter() |
230 |
How can I show or display the control's filter
Dim oGrid as P Dim var_Column as local oGrid = topparent:CONTROL_ACTIVEX1.activex ' oGrid.Columns.Add("Filter").DisplayFilterButton = .t. var_Column = oGrid.Columns.Add("Filter") oGrid.TemplateDef = "dim var_Column" oGrid.TemplateDef = var_Column oGrid.Template = "var_Column.DisplayFilterButton = True" |
229 |
How can I customize the items being displayed in the drop down filter window
Dim oGrid as P Dim var_Column as P oGrid = topparent:CONTROL_ACTIVEX1.activex var_Column = oGrid.Columns.Add("Custom Filter") var_Column.DisplayFilterButton = .t. var_Column.DisplayFilterPattern = .f. var_Column.CustomFilter = "Excel Spreadsheets (*.xls )||*.xls|||Word Documents||*.doc|||Powerpoint Presentations||*.pps|||Text Documents (*.log,*.txt)||*.txt|*.log" var_Column.FilterType = 3 var_Column.Filter = "*.xls" oGrid.Items.AddItem("excel.xls") oGrid.Items.AddItem("word.doc") oGrid.Items.AddItem("pp.pps") oGrid.Items.AddItem("text.txt") oGrid.ApplyFilter() |
228 |
How can I change the order or the position of the columns in the sort bar
Dim oGrid as P Dim var_Column as local Dim var_Column1 as local oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.SortBarVisible = .t. oGrid.SortBarColumnWidth = 48 ' oGrid.Columns.Add("C1").SortOrder = 1 var_Column = oGrid.Columns.Add("C1") oGrid.TemplateDef = "dim var_Column" oGrid.TemplateDef = var_Column oGrid.Template = "var_Column.SortOrder = 1" ' oGrid.Columns.Add("C2").SortOrder = 2 var_Column1 = oGrid.Columns.Add("C2") oGrid.TemplateDef = "dim var_Column1" oGrid.TemplateDef = var_Column1 oGrid.Template = "var_Column1.SortOrder = 2" oGrid.Columns.Item("C2").SortPosition = 0 |
227 |
How do I arrange my columns on multiple levels
Dim oGrid as P Dim var_Column as local Dim var_Column1 as local Dim var_Column2 as local Dim var_Column3 as local Dim var_Column4 as local Dim var_Column5 as local Dim var_Column6 as local Dim var_Column7 as local Dim var_Column8 as local oGrid = topparent:CONTROL_ACTIVEX1.activex ' oGrid.Columns.Add("S").Width = 32 var_Column = oGrid.Columns.Add("S") oGrid.TemplateDef = "dim var_Column" oGrid.TemplateDef = var_Column oGrid.Template = "var_Column.Width = 32" ' oGrid.Columns.Add("Level 2").LevelKey = 1 var_Column1 = oGrid.Columns.Add("Level 2") oGrid.TemplateDef = "dim var_Column1" oGrid.TemplateDef = var_Column1 oGrid.Template = "var_Column1.LevelKey = 1" ' oGrid.Columns.Add("Level 3").LevelKey = 1 var_Column2 = oGrid.Columns.Add("Level 3") oGrid.TemplateDef = "dim var_Column2" oGrid.TemplateDef = var_Column2 oGrid.Template = "var_Column2.LevelKey = 1" ' oGrid.Columns.Add("Level 4").LevelKey = 1 var_Column3 = oGrid.Columns.Add("Level 4") oGrid.TemplateDef = "dim var_Column3" oGrid.TemplateDef = var_Column3 oGrid.Template = "var_Column3.LevelKey = 1" ' oGrid.Columns.Add("Level 1").LevelKey = "2" var_Column4 = oGrid.Columns.Add("Level 1") oGrid.TemplateDef = "dim var_Column4" oGrid.TemplateDef = var_Column4 oGrid.Template = "var_Column4.LevelKey = `2`" ' oGrid.Columns.Add("Level 2").LevelKey = "2" var_Column5 = oGrid.Columns.Add("Level 2") oGrid.TemplateDef = "dim var_Column5" oGrid.TemplateDef = var_Column5 oGrid.Template = "var_Column5.LevelKey = `2`" ' oGrid.Columns.Add("Level 3").LevelKey = "2" var_Column6 = oGrid.Columns.Add("Level 3") oGrid.TemplateDef = "dim var_Column6" oGrid.TemplateDef = var_Column6 oGrid.Template = "var_Column6.LevelKey = `2`" ' oGrid.Columns.Add("Level 4").LevelKey = "2" var_Column7 = oGrid.Columns.Add("Level 4") oGrid.TemplateDef = "dim var_Column7" oGrid.TemplateDef = var_Column7 oGrid.Template = "var_Column7.LevelKey = `2`" ' oGrid.Columns.Add("E").Width = 32 var_Column8 = oGrid.Columns.Add("E") oGrid.TemplateDef = "dim var_Column8" oGrid.TemplateDef = var_Column8 oGrid.Template = "var_Column8.Width = 32" |
226 |
How do I arrange my columns on multiple lines
Dim oGrid as P Dim var_Column as local oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.HeaderHeight = 32 ' oGrid.Columns.Add("").HTMLCaption = "Line 1<br>Line 2" var_Column = oGrid.Columns.Add("") oGrid.TemplateDef = "dim var_Column" oGrid.TemplateDef = var_Column oGrid.Template = "var_Column.HTMLCaption = `Line 1<br>Line 2`" |
225 |
How can I display all cells using HTML format
Dim oGrid as P Dim var_Column as local oGrid = topparent:CONTROL_ACTIVEX1.activex ' oGrid.Columns.Add("HTML").Def(17) = 1 var_Column = oGrid.Columns.Add("HTML") oGrid.TemplateDef = "dim var_Column" oGrid.TemplateDef = var_Column oGrid.Template = "var_Column.Def(17) = 1" oGrid.Items.AddItem("<font ;12>T</font>his <b>is</b> an <a>html</a> <font Tahoma><fgcolor=FF0000>text</fgcolor></font>.") |
224 |
How can I display all cells using multiple lines
Dim oGrid as P Dim var_Column as local Dim var_Column1 as local Dim var_Items as P oGrid = topparent:CONTROL_ACTIVEX1.activex ' oGrid.Columns.Add("MultipleLine").Def(16) = .f. var_Column = oGrid.Columns.Add("MultipleLine") oGrid.TemplateDef = "dim var_Column" oGrid.TemplateDef = var_Column oGrid.Template = "var_Column.Def(16) = False" ' oGrid.Columns.Add("SingleLine").Def(16) = .t. var_Column1 = oGrid.Columns.Add("SingleLine") oGrid.TemplateDef = "dim var_Column1" oGrid.TemplateDef = var_Column1 oGrid.Template = "var_Column1.Def(16) = True" var_Items = oGrid.Items ' var_Items.CellValue(var_Items.AddItem("This is a bit of long text that should break the line"),1) = "this is a bit of long text that's displayed on a single line" oGrid.TemplateDef = "dim var_Items" oGrid.TemplateDef = var_Items oGrid.Template = "var_Items.CellValue(AddItem(`This is a bit of long text that should break the line`),1) = `this is a bit of long text that's displayed on a single line`" |
223 |
How do change the vertical alignment for all cells in the column
Dim oGrid as P Dim var_Column as local Dim var_Column1 as local Dim var_Items as P Dim var_Items1 as P oGrid = topparent:CONTROL_ACTIVEX1.activex ' oGrid.Columns.Add("MultipleLine").Def(16) = .f. var_Column = oGrid.Columns.Add("MultipleLine") oGrid.TemplateDef = "dim var_Column" oGrid.TemplateDef = var_Column oGrid.Template = "var_Column.Def(16) = False" ' oGrid.Columns.Add("VAlign").Def(6) = 2 var_Column1 = oGrid.Columns.Add("VAlign") oGrid.TemplateDef = "dim var_Column1" oGrid.TemplateDef = var_Column1 oGrid.Template = "var_Column1.Def(6) = 2" var_Items = oGrid.Items ' var_Items.CellValue(var_Items.AddItem("This is a bit of long text that should break the line"),1) = "bottom" oGrid.TemplateDef = "dim var_Items" oGrid.TemplateDef = var_Items oGrid.Template = "var_Items.CellValue(AddItem(`This is a bit of long text that should break the line`),1) = `bottom`" var_Items1 = oGrid.Items ' var_Items1.CellValue(var_Items1.AddItem("This is a bit of long text that should break the line"),1) = "bottom" oGrid.TemplateDef = "dim var_Items1" oGrid.TemplateDef = var_Items1 oGrid.Template = "var_Items1.CellValue(AddItem(`This is a bit of long text that should break the line`),1) = `bottom`" |
222 |
How do change the foreground color for all cells in the column
Dim oGrid as P Dim var_Column as local oGrid = topparent:CONTROL_ACTIVEX1.activex ' oGrid.Columns.Add("ForeColor").Def(5) = 255 var_Column = oGrid.Columns.Add("ForeColor") oGrid.TemplateDef = "dim var_Column" oGrid.TemplateDef = var_Column oGrid.Template = "var_Column.Def(5) = 255" oGrid.Items.AddItem(0) oGrid.Items.AddItem(1) |
221 |
How do change the background color for all cells in the column
Dim oGrid as P Dim var_Column as local oGrid = topparent:CONTROL_ACTIVEX1.activex ' oGrid.Columns.Add("BackColor").Def(4) = 255 var_Column = oGrid.Columns.Add("BackColor") oGrid.TemplateDef = "dim var_Column" oGrid.TemplateDef = var_Column oGrid.Template = "var_Column.Def(4) = 255" oGrid.Items.AddItem(0) oGrid.Items.AddItem(1) |
220 |
How do I show buttons for all cells in the column
Dim oGrid as P Dim var_Column as P oGrid = topparent:CONTROL_ACTIVEX1.activex var_Column = oGrid.Columns.Add("Button") ' var_Column.Def(2) = .t. oGrid.TemplateDef = "dim var_Column" oGrid.TemplateDef = var_Column oGrid.Template = "var_Column.Def(2) = True" ' var_Column.Def(3) = .t. oGrid.TemplateDef = "dim var_Column" oGrid.TemplateDef = var_Column oGrid.Template = "var_Column.Def(3) = True" oGrid.Items.AddItem(" Button 1 ") oGrid.Items.AddItem(" Button 2 ") |
219 |
How do I show buttons for all cells in the column
Dim oGrid as P Dim var_Column as local oGrid = topparent:CONTROL_ACTIVEX1.activex ' oGrid.Columns.Add("Button").Def(2) = .t. var_Column = oGrid.Columns.Add("Button") oGrid.TemplateDef = "dim var_Column" oGrid.TemplateDef = var_Column oGrid.Template = "var_Column.Def(2) = True" oGrid.Items.AddItem(0) oGrid.Items.AddItem(1) |
218 |
How do I display radio buttons for all cells in the column
Dim oGrid as P Dim var_Column as local oGrid = topparent:CONTROL_ACTIVEX1.activex ' oGrid.Columns.Add("Radio").Def(1) = .t. var_Column = oGrid.Columns.Add("Radio") oGrid.TemplateDef = "dim var_Column" oGrid.TemplateDef = var_Column oGrid.Template = "var_Column.Def(1) = True" oGrid.Items.AddItem(0) oGrid.Items.AddItem(1) |
217 |
How do I display checkboxes for all cells in the column
Dim oGrid as P Dim var_Column as local oGrid = topparent:CONTROL_ACTIVEX1.activex ' oGrid.Columns.Add("Check").Def(0) = .t. var_Column = oGrid.Columns.Add("Check") oGrid.TemplateDef = "dim var_Column" oGrid.TemplateDef = var_Column oGrid.Template = "var_Column.Def(0) = True" oGrid.Items.AddItem(0) oGrid.Items.AddItem(1) |
216 |
How can I display a tooltip when the cursor hovers the column
Dim oGrid as P Dim var_Column as local oGrid = topparent:CONTROL_ACTIVEX1.activex ' oGrid.Columns.Add("tooltip").ToolTip = "This is a bit of text that is shown when user hovers the column." var_Column = oGrid.Columns.Add("tooltip") oGrid.TemplateDef = "dim var_Column" oGrid.TemplateDef = var_Column oGrid.Template = "var_Column.ToolTip = `This is a bit of text that is shown when user hovers the column.`" |
215 |
Is there any function to assign a key to a column instead using its name or capion
Dim oGrid as P Dim var_Column as local Dim var_Column1 as local oGrid = topparent:CONTROL_ACTIVEX1.activex ' oGrid.Columns.Add("Data").Key = "DKey" var_Column = oGrid.Columns.Add("Data") oGrid.TemplateDef = "dim var_Column" oGrid.TemplateDef = var_Column oGrid.Template = "var_Column.Key = `DKey`" ' oGrid.Columns.Item("DKey").Caption = "new caption" var_Column1 = oGrid.Columns.Item("DKey") oGrid.TemplateDef = "dim var_Column1" oGrid.TemplateDef = var_Column1 oGrid.Template = "var_Column1.Caption = `new caption`" |
214 |
Is there any function to assign any extra data to a column
Dim oGrid as P Dim var_Column as local oGrid = topparent:CONTROL_ACTIVEX1.activex ' oGrid.Columns.Add("Data").Data = "your extra data" var_Column = oGrid.Columns.Add("Data") oGrid.TemplateDef = "dim var_Column" oGrid.TemplateDef = var_Column oGrid.Template = "var_Column.Data = `your extra data`" |
213 |
By default, the column gets sorted descending, when I first click its header. How can I change so the column gets sorted ascending when the user first clicks the column's header
Dim oGrid as P Dim var_Column as local oGrid = topparent:CONTROL_ACTIVEX1.activex ' oGrid.Columns.Add("Sort").DefaultSortOrder = .t. var_Column = oGrid.Columns.Add("Sort") oGrid.TemplateDef = "dim var_Column" oGrid.TemplateDef = var_Column oGrid.Template = "var_Column.DefaultSortOrder = True" |
212 |
How can I specify the maximum width for the column, if I use WidthAutoResize property
Dim oGrid as P Dim var_Column as P oGrid = topparent:CONTROL_ACTIVEX1.activex var_Column = oGrid.Columns.Add("Auto") var_Column.WidthAutoResize = .t. var_Column.MinWidthAutoResize = 32 var_Column.MaxWidthAutoResize = 128 oGrid.Items.AddItem(0) oGrid.Items.AddItem(1) |
211 |
How can I specify the minimum width for the column, if I use WidthAutoResize property
Dim oGrid as P Dim var_Column as P oGrid = topparent:CONTROL_ACTIVEX1.activex var_Column = oGrid.Columns.Add("Auto") var_Column.WidthAutoResize = .t. var_Column.MinWidthAutoResize = 32 oGrid.Items.AddItem(0) oGrid.Items.AddItem(1) |
210 |
Is there any option to resize the column based on its data, captions
Dim oGrid as P Dim var_Column as local oGrid = topparent:CONTROL_ACTIVEX1.activex ' oGrid.Columns.Add("A").WidthAutoResize = .t. var_Column = oGrid.Columns.Add("A") oGrid.TemplateDef = "dim var_Column" oGrid.TemplateDef = var_Column oGrid.Template = "var_Column.WidthAutoResize = True" oGrid.Items.AddItem(0) oGrid.Items.AddItem(1) |
209 |
How can I align the icon in the column's header in the center
Dim oGrid as P Dim var_Column as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=") var_Column = oGrid.Columns.Add("") var_Column.HeaderImage = 1 var_Column.HeaderImageAlignment = 1 |
208 |
How do I align the icon in the column's header to the right
Dim oGrid as P Dim var_Column as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=") var_Column = oGrid.Columns.Add("ColumnName") var_Column.HeaderImage = 1 var_Column.HeaderImageAlignment = 2 |
207 |
How do I show or hide the sorting icons, but still need sorting
Dim oGrid as P Dim var_Column as local oGrid = topparent:CONTROL_ACTIVEX1.activex ' oGrid.Columns.Add("Sorted").SortOrder = 1 var_Column = oGrid.Columns.Add("Sorted") oGrid.TemplateDef = "dim var_Column" oGrid.TemplateDef = var_Column oGrid.Template = "var_Column.SortOrder = 1" oGrid.Columns.Item(0).DisplaySortIcon = .f. |
206 |
How do I enable or disable the entire column
Dim oGrid as P Dim var_Column as local Dim var_Items as P Dim var_Items1 as P oGrid = topparent:CONTROL_ACTIVEX1.activex oGrid.Columns.Add("C1") ' oGrid.Columns.Add("Disabled").Enabled = .f. var_Column = oGrid.Columns.Add("Disabled") oGrid.TemplateDef = "dim var_Column" oGrid.TemplateDef = var_Column oGrid.Template = "var_Column.Enabled = False" var_Items = oGrid.Items ' var_Items.CellValue(var_Items.AddItem(0),1) = "0.1" oGrid.TemplateDef = "dim var_Items" oGrid.TemplateDef = var_Items oGrid.Template = "var_Items.CellValue(AddItem(0),1) = `0.1`" var_Items1 = oGrid.Items ' var_Items1.CellValue(var_Items1.AddItem(1),1) = "1.1" oGrid.TemplateDef = "dim var_Items1" oGrid.TemplateDef = var_Items1 oGrid.Template = "var_Items1.CellValue(AddItem(1),1) = `1.1`" |
205 |
How do I disable drag and drop columns
Dim oGrid as P Dim var_Column as local Dim var_Column1 as local oGrid = topparent:CONTROL_ACTIVEX1.activex ' oGrid.Columns.Add("C1").AllowDragging = .f. var_Column = oGrid.Columns.Add("C1") oGrid.TemplateDef = "dim var_Column" oGrid.TemplateDef = var_Column oGrid.Template = "var_Column.AllowDragging = False" ' oGrid.Columns.Add("C2").AllowDragging = .f. var_Column1 = oGrid.Columns.Add("C2") oGrid.TemplateDef = "dim var_Column1" oGrid.TemplateDef = var_Column1 oGrid.Template = "var_Column1.AllowDragging = False" |
204 |
How do I disable resizing a column at runtime
Dim oGrid as P Dim var_Column as local oGrid = topparent:CONTROL_ACTIVEX1.activex ' oGrid.Columns.Add("Unsizable").AllowSizing = .f. var_Column = oGrid.Columns.Add("Unsizable") oGrid.TemplateDef = "dim var_Column" oGrid.TemplateDef = var_Column oGrid.Template = "var_Column.AllowSizing = False" oGrid.Columns.Add("C2") oGrid.Columns.Add("C3") oGrid.Columns.Add("C4") |
203 |
How can I align the column to the right, and its caption too
Dim oGrid as P Dim var_Column as P oGrid = topparent:CONTROL_ACTIVEX1.activex var_Column = oGrid.Columns.Add("Column") var_Column.Alignment = 2 var_Column.HeaderAlignment = 2 oGrid.Items.AddItem(0) oGrid.Items.AddItem(1) |
202 |
How can I align the column to the right
Dim oGrid as P Dim var_Column as local oGrid = topparent:CONTROL_ACTIVEX1.activex ' oGrid.Columns.Add("Column").Alignment = 2 var_Column = oGrid.Columns.Add("Column") oGrid.TemplateDef = "dim var_Column" oGrid.TemplateDef = var_Column oGrid.Template = "var_Column.Alignment = 2" oGrid.Items.AddItem(0) oGrid.Items.AddItem(1) |
201 |
How do I change the column's caption
Dim oGrid as P Dim var_Column as local oGrid = topparent:CONTROL_ACTIVEX1.activex ' oGrid.Columns.Add("Column").Caption = "new caption" var_Column = oGrid.Columns.Add("Column") oGrid.TemplateDef = "dim var_Column" oGrid.TemplateDef = var_Column oGrid.Template = "var_Column.Caption = `new caption`" |